/*package com.rykj.qxj.rest;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.github.pagehelper.PageInfo;
import com.rykj.qxj.server.model.entity.ApiManage;
import com.rykj.qxj.server.model.entity.ApiOperationRecord;
import com.rykj.qxj.server.model.entity.ApiRequestParam;
import com.rykj.qxj.server.model.entity.ApiResponseParam;
import com.rykj.qxj.server.services.ApiManageService;
import com.rykj.qxj.server.services.ApiOperationRecordService;
import com.rykj.qxj.server.services.ApiRequestParamService;
import com.rykj.qxj.server.services.ApiResponseParamService;
import com.rykj.qxj.server.util.Pager;
import com.rykj.qxj.util.Result;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j;

@Log4j
@RestController
@RequestMapping("/v1/apiManage/apiOperationRecord")
@Api(tags="接口管理")
public class ApiOperationRecordController {
	
	@Autowired
	private ApiOperationRecordService apiOperationRecordService;
	 
	@Autowired
	private ApiManageService apiManageService;
	
	@Autowired
	private ApiRequestParamService apiRequestParamService;
	
	@Autowired
	private ApiResponseParamService apiResponseParamService;
	
	@GetMapping("/list")
    @ApiOperation(value="开发者管理中心分页获取接口变动记录列表",notes ="开发者管理中心分页获取接口变动记录列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "当前页数",required = true,paramType = "query"),
            @ApiImplicitParam(name = "pageSize", value = "显示行数",required = true,paramType = "query"),
            @ApiImplicitParam(name = "apiId", value = "接口的Id",required = true,paramType = "query"),
            @ApiImplicitParam(name = "changeType", value = "变动类型",paramType = "query"),
            @ApiImplicitParam(name = "apiVerifyStatus", value = "审核状态",paramType = "query")
    })
    public Result getApiManageList(@RequestParam(value = "pageNum") Integer pageNum,
                                   @RequestParam(value = "pageSize") Integer pageSize,
                                   @RequestParam(value = "apiId") Integer apiId,
                                   @RequestParam(value = "changeType",required = false) String changeType,
                                   @RequestParam(value = "apiVerifyStatus",required = false) String apiVerifyStatus){
        try{
           PageInfo pager = apiOperationRecordService.selectPageBySearchParams(pageNum, pageSize, changeType, apiVerifyStatus,apiId);
            return new Result(pager);
        }catch (Exception e){
            log.error("查询失败", e);
            return new Result(false, "查询失败");
        }
    }
	@GetMapping("/details")
    @ApiOperation(value="变动详情",notes ="变动详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "变动记录id主键",required = true,paramType = "query")
    })
    public Result getApiOperationRecordDetails( @RequestParam(value = "id") Integer id){
		if(log.isDebugEnabled()) {
    		log.debug("apiOperationRecord id="+id);
    	}
		if(id==null) {
			return new Result(false,"变动记录的id不能为空");
		}
        try{
        	ApiManage apiManage=null;
        	List<ApiRequestParam> apiRequestParamList=null;
        	List<ApiResponseParam> responseParamList=null;
        	Map<String,Object> reaponseMap =new HashMap<>();
        	ApiOperationRecord apiOperationRecord = apiOperationRecordService.selectByPrimaryKey(id);
        	if(apiOperationRecord!=null) {
        		apiManage = apiManageService.selectByPrimaryKey(apiOperationRecord.getApiId());
        		if(apiManage!=null) {
        			//apiRequestParamList= apiRequestParamService.selectApiRequestParamListByApiId(apiManage.getId());
        			//responseParamList = apiResponseParamService.selectApiResponseParamListByapiId(apiManage.getId());
        		}
        	}
        	reaponseMap.put("changeInfo", apiOperationRecord);
        	reaponseMap.put("apiBasicInfo", apiManage);
        	reaponseMap.put("requestParams", apiRequestParamList);
        	reaponseMap.put("responseParams", responseParamList);
        	return new Result(reaponseMap);
        }catch (Exception e){
            log.error("查询变动详情失败", e);
            return new Result(false, "查询变动详情失败");
        }
    }

}
*/